<!-- 基本信息 -->
<template>
    <view>
        <status-bar title='基本信息' :goHome='fromShare'></status-bar>
        <view class="p-top70 p-bot50 p-left50 p-right50">
            <view class="flexac m-bot30">
                <u-avatar :src="$imgUrls(info.v_headimg)" size="60"></u-avatar>
            </view>
            <view class="item p-top30 p-bot30" v-for="(item,index) in info.list" :key="index">
                <view class="h6 color_77 m-bot10">{{ item.vpName }}</view>
                <view class="size28 color_11">{{ item.value ? item.value : '未设置' }}</view>
            </view>
        </view>
    </view>
</template>

<script>
export default {
    data(){
        return {
            fromShare: 0,
            guest_id: '',
            info: ''
        }
    },
    onLoad(e){
        if(e.guest_id) this.guest_id = e.guest_id
        this.getInfo()
    },
    methods: {
        getInfo(){
            this.$http.get({
                url: '/PrivateSphereApi/guestBaseInfo',
                data: {
                    guest_id: this.guest_id
                }
            }).then(res=>{
                if(res.code != 200) return this.$Toast(res.msg)
                this.info = res.data.data
            })
        }
    }
}
</script>

<style lang="scss" scoped>
.item {
    border-bottom: 1rpx solid #D9D9D9;
}
</style>